<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>
<%@ taglib prefix="s" uri="/struts-tags"  %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title>CRM</title>
	<link rel="stylesheet" href="${basePath }/css/bootstraplan.css" />
	<style type="text/css">
		#tag{
			background-image: url(${basePath }/img/highrise_sprites.png);
			no-repeat :none;
			background-position:-68px -180px;
			width: 42px;
			padding-top: 40px;
			padding-bottom:20px;
		}
		#defaulthead{
			background-image: url(${basePath }/img/highrise_sprites.png);
			no-repeat :none;
			background-position:-116px -55px;
			width: 40px;
			height:40px;
			padding-top: 10px;
		}	
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top"  style="background-color:#085F8A">
		<div class="navbar-inner" style="padding-top:20px">
			<div class="container">
				<div class="row-fluid">
					<div class="span1"  id="tag"></div>
					<div class="span2" style="padding-top:6px">
						<a href="" style="display:inline;font-size:20px;font-weight:bold;color:#fff">客户关系管理</a>
					</div>
					<div class="span6">
						<a href="${basePath }/addContact.action" class="btn">添加联系人</a>
						<a href="${basePath }/addTask.action" class="btn">添加新任务</a>
					</div>
					<div class="span3">
						<ul class="nav pull-right">
						    <li class="divider-vertical"></li>
							<li class="dropdown">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown"> 用户设置<b class="caret"></b></a>
								<ul class="dropdown-menu">
									<li>
										<a href="#">个人信息</a>
									</li>
									<li>
										<a href="#">修改密码</a>
									</li>
									<li>
										<a href="#">服务中心</a>
									</li>
								</ul>
							</li>
							<li>
								<a href="#">安全退出</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
		
		</div>
	
	</div>
	<div class="row-fluid">
		<div class="span3">
			<div style="padding-left:16px 0;margin-top:160px;margin-left:20px">
				<ul class="nav nav-list" >
					<li class="nav-header" style="padding-top:0px;font-size:16px">Welcome!</li>
					<li><a href="home.action"><i class="icon-home"></i>最新动态</a></li>
					<li class="active"><a href="contactlist.action"><i class="icon-user"></i>联系人</a></li>
					<li><a href="task/toCalendar.action"><i class="icon-leaf"></i>日程</a></li>
					<li><a href="deal.action"><i class="icon-gift"></i>交易</a></li>
					<li><a href="emails.action"><i class="icon-gift"></i>群发邮件</a></li>
				</ul>
			</div>
		</div>
		<div class="span8" style="margin-top:140px;border:2px solid #ccc;border-radius:5px;">
			<div class="row-fluid">
				<div class="span8">
					<s:if test="contact==null">
						此联系人不存在，或者您没有权限。
					</s:if>
					<s:else>
					<div>
						<div style="height:50px;margin:10px;">
							<s:if test="contact.type=='person'">
							<div id="defaulthead" style="margin:0px;float:left;margin-right:20px;"></div>
							</s:if>	
							<s:else>
								<div id="defaulthead" style="margin:0px;float:left;margin-right:20px;background-position:-6px -55px"></div>
							</s:else>	
							<div>
								<b style="font-size:24px">
									<s:property value="contact.username"/>
								</b>
							</div>	
							<div>
								<s:if test="contact.type=='person'&&contact.companyName!=''">
								成员&nbsp;@&nbsp;<s:property  value="contact.companyName"/><br />
								</s:if>
								<s:else>
								
								</s:else>
							</div>
							<div>
								<div style="float:left">
									<s:if test="contact.tagList!=null">
									<s:iterator value="contact.tagList" var="tt">
										<code><s:property value="#tt.name"/></code>
									</s:iterator>
									</s:if>
								</div>
								<div id="edit">
									<span style="padding-left:10px;"><a>编辑标签</a></span>
								</div>
							</div>
						</div>
					</div>			
					<div style="margin-top:30px;margin-left:10px;padding:20px;height:500px;">	
						<div id="标签项" class="tabbable">
							<ul class="nav nav-tabs" id="my-tab">
								<li class="active"><a href="#addtag" data-toggle="tab">添加便签</a></li>
								<li><a href="#deal" data-toggle="tab">交易</a></li>	
							</ul>
							<div class="tab-content" style="">
								<div class="tab-pane active" id="addtag">
									<form action="" method="post">
										<div>
											<textarea name="" id="" style="width:400px" rows="6"></textarea><br/>
										</div>
										<a href="" class="btn">添加</a>&nbsp;or&nbsp;
										<a href="">取消</a>
									</form>
								</div>
								<div class="tab-pane" id="deal">
									<form action="" method="post">
										<div>
											<textarea name="" id="" style="width:400px" rows="6" ></textarea><br />
										</div>
										<a href="" class="btn">添加</a>&nbsp;or&nbsp;
										<a href="">取消</a>
									</form>
								</div>	
							</div>
						</div>
						<div>
							<div style="margin-top:20px;background-color:#eee;padding:10px;">
								xxxxx
							</div>
							<div style="padding:10px;padding-left:20px;">
								<div><b>几月几号 星期几</b></div>
								<div style="color:#999;">
									谁在deal、contact上添加的note
								</div>
								<div>
									note的内容。。。。
								</div>
							
							</div>
						</div>
					</div>
					</s:else>
					
				</div>
				<div class="span4">
					<div style="padding:20px;">
						<div style="line-height:40px;padding:5px;">
						<s:if test="contact.type=='person'">
						<a href="${basePath }/editContact.action?username=${param.username}" style="color:red;">编辑联系人</a>
						</s:if>
						<s:else>
						<a href="${basePath }/editCompany.action?username=${param.username}" style="color:red;">编辑公司</a>
						</s:else>	
						</div>
						<div>
							<div style="background-color:#eee;padding:5px;">
								任务
							</div>
							<div></div>
							<div style="padding:5px;">
								<a href="">添加任务</a>
							</div>
						</div>
						<div>
							<div style="background-color:#eee;padding:5px;">
								联系人信息
							</div>
							<div>
								<div style="padding:5px;">
									<s:if test="contact.emailList!=null">
									<s:iterator value="contact.emailList" var="cm">
										<s:property value="#cm.email"/>
										<s:property value="#cm.type"/>
									</s:iterator>
									</s:if>
								</div>
								<div style="padding:5px;">
									<s:if test="contact.telList!=null">
									<s:iterator value="contact.telList" var="ct">
										<s:property value="#ct.telnum"/>
										<s:property value="#ct.type"/>
									</s:iterator>
									</s:if>
								
								</div>
								<div style="padding:5px;">
									<s:if test="contact.addressList!=null">
									<s:iterator value="contact.addressList" var="ad">
										<s:property value="#ad.address"/>
										<s:property value="#ad.type"/>
									</s:iterator>
									</s:if>
								</div>
								<div style="padding:5px;">
									<s:if test="contact.imList!=null">
									<s:iterator value="contact.imList" var="im">
										<s:property value="#im.im"/>
										<s:property value="#im.sort"/>
										<s:property value="#im.type"/>
									</s:iterator>
									</s:if>
								</div>
							</div>
						</div>
					</div>
				</div>				
			</div>
		</div>
</div>	
	
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			/*$("#deltag").click(function(){
				alert("dd");
			
			});
			$("#edit").click(function(){
				//var t = $("this").html();
				alert("dd");
				//$("this").html();
			
			});*/
		});
	</script>
	
	
</body>
</html>